package com.xkdx.guangguang.fragment.comment;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.xkdx.guangguang.module.network.AbsModule;

public class ShopCommentModule extends AbsModule {
	public boolean isCommentSucess = false;

	@Override
	public void parseData() throws Exception {
		backJson = (JSONArray) result;
		try {
			for (int i = 0; i < backJson.length(); i++) {
				jsonObj = (JSONObject) backJson.get(i);
				String sortOfAct = jsonObj.getString("Act");
				if (sortOfAct.equals("commentOnShop")) {
					parse(jsonObj.getJSONObject("Content"));
				}

			}
		} catch (Exception e) {
			throw e;
		}

	}

	private void parse(JSONObject commnetary) throws Exception {
		try {
			JSONObject stut = (JSONObject) commnetary.get("Result");
			String state = stut.getString("Status");
			if (state.equals("Success")) {
				isCommentSucess = true;
			}
		} catch (JSONException e) {
			throw e;
		}
	}

}
